import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'hx_demo_method_channel.dart';

abstract class HxDemoPlatform extends PlatformInterface {
  /// Constructs a HxDemoPlatform.
  HxDemoPlatform() : super(token: _token);

  static final Object _token = Object();

  static HxDemoPlatform _instance = MethodChannelHxDemo();

  /// The default instance of [HxDemoPlatform] to use.
  ///
  /// Defaults to [MethodChannelHxDemo].
  static HxDemoPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [HxDemoPlatform] when
  /// they register themselves.
  static set instance(HxDemoPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    print("object");
    throw UnimplementedError('platformVersion() has not been implemented.');
  }


  /// appKey: “管理员模式 > 渠道管理 > 手机APP”页面的关联的“AppKey”
  /// tenantId: “管理员模式 > 设置 > 企业信息”页面的“租户ID”
  Future<String?> init(String appKey, String tenantId) async{
    throw UnimplementedError('register() has not been implemented.');
  }

  /// 注册
  Future<bool?> register(String username, String password) async {
    throw UnimplementedError('register() has not been implemented.');
  }

  /// 登录
  Future<bool?> login(String username, String password) async {
    throw UnimplementedError('login() has not been implemented.');
  }

  /// 是否登录
  Future<bool?> get isLogin {
    throw UnimplementedError('isLogin() has not been implemented.');
  }

  /// 注销登录
  Future<bool?> logout() async {
    throw UnimplementedError('logout() has not been implemented.');
  }
}
